#ifndef LIRSQL_H
#define LIRSQL_H

#include "progsql.h"

#define LIR_GAMEID_SIZE		16
typedef char LIRGameID[LIR_GAMEID_SIZE];

class LIRSavedGame;

//
// All money values are in cents (100 == $1, 25 == $.25, 1 == $.01)
//
// IMPORTANT:  Access to this class is NOT thread-safe.  That's handled at
//			   the next level up (with calls to lock()/unlock()).
//

class LIRSQL : public ProgressiveTrackSQL
{
	public:
		LIRSQL(const String & DBDSN, const String & DBLogin,
			const String & DBPassword);

		int32 createGame(int32 casinoId,
			PID, bool8 forMoney, SESSIONID, int32 compFactor,
			LIRGameID, int32 bet, int32 progressiveBet,
			int32 multiBankBet, int32* balance, int32* comp,
			uint8 payTable);

		int32 deal(PID, LIRGameID, int32 nDeckSeed, int32 numPlayer, uint8* player);    // kharmon.  10-16-06.  #8226.  

   		int32 turnOneDone(PID, bool8 forMoney, LIRGameID, bool8 raised, int32 numDealer, uint8* dealer);    // kharmon.  11-07-06.  #8226.  

		int32 gameDone(int32 casinoId,
			PID, bool8 forMoney, LIRGameID, bool8 raised,
			int32 payouts[3], int32 payProgressive, int32 payMultiBank, 
			int32 outcome, int32 balanceAdjust, bool8 bMalfunction,         // kharmon.  01-05-06.  #4250.
            int32* balance, int32* comp, int32 numDealer, uint8* dealer,    // kharmon.  10-16-06.  #8226.  
			int32 numPlayer, uint8* player);    

		int32 hasSavedGame(PID, bool8 forMoney,
			LIRGameID, LIRSavedGame*, bool8* exists);
		int32 removeSavedGame(PID, bool8 forMoney);
		int32 saveGame(PID, bool8 forMoney, LIRGameID, LIRSavedGame*);
		
		int32 getOptions(uint8& payTable, bool8& progressiveOn, 
			uint8& progPayTable, uint8& realProgBetPcnt, uint8& funProgBetPcnt, int32&jackpotID, int32& progressiveFixAmountMultiplier);
};

#endif
